package com.yifushidai.entity;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_room_management")
@ApiModel(value = "家电功率管理表")
public class RoomManagementEntity {
    @ApiModelProperty(value = "ID")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @JSONField(serialize = false)
    private Integer id;

    @ApiModelProperty(value = "联网mac")
    @Column(name = "unique_mac")
    private String uniqueMac;

    @ApiModelProperty(value = "属性名")
    @Column(name = "attr_key")
    private String attrKey;

    @ApiModelProperty(value = "属性值")
    @Column(name = "attr_val")
    private String attrVal;

    @ApiModelProperty(value = "数量")
    private Integer number;

    @ApiModelProperty(value = "功率(千瓦)")
    private Double power;

    @ApiModelProperty(value = "空调P数")
    @Column(name = "air_p")
    private Double airP;
}